<template>
  <el-tabs v-model="activeName" @tab-change="handleChange">
    <el-tab-pane label="养老" name="first">
      <Elderly ref="ElderlyRef"
    /></el-tab-pane>
    <el-tab-pane label="托育" name="second">
      <Child ref="ChildRef"
    /></el-tab-pane>
  </el-tabs>
</template>

<script setup>
import { reactive, ref } from "vue";
import Child from "./Child.vue";
import Elderly from "./Elderly.vue";
import { ElTabPane, ElTabs } from "element-plus";

const activeName = ref("first");
const ElderlyRef = ref();
const ChildRef = ref();
function handleChange(params) {
  params == "first"
    ? ElderlyRef.value?.handleRefresh()
    : ChildRef.value?.handleRefresh();
}
</script>

<style lang="scss" scoped>
@import url("@/styles/daily.scss");
</style>
